package com.bt7274.pojo.bo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
/**
 * @Data 2025/3/25 02:10
 * @Author hp
 * @Version 1.0
 * @Description UserBO
 */

@Data      // 自动生成getter和setter方法
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class UserBO {
    private String id;
    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 16, message = "用户名必须为3～16个字符" )
    private String username;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码必须在6～20范围内")
    private String password;

    /**
     * 邮箱
     */
    @Email(message = "Email format is invalid")
    private String email;

    /**
     * 邀请码（PT站必须有邀请码才能注册）
     */
    @NotBlank(message = "邀请码不能为空")
    private String inviteCode;

}

